<!DOCTYPE html>
<html>
<head>
	<title>&nbsp;&nbsp;&nbsp;</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta charset="utf-8"/>
	<link rel="shortcut icon" href="${cdn}/favicon.ico"/>

	<%
	if (profile=="dev") {
	%>
	<link href="${cdn}/static/skins/lightblue/assets/dhtmlx4/skins/dhx_skyblue_clouds/dhtmlx.css" rel="stylesheet" type="text/css">

	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">

	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/css/components-md.css" rel="stylesheet" type="text/css">
	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/css/plugins-md.css" rel="stylesheet" type="text/css">

	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-sweetalert/sweetalert.css" rel="stylesheet" type="text/css">
	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-toastr/toastr.min.css" rel="stylesheet" type="text/css">

	<link href="${cdn}/static/jsplatform/portal/layout/task/v0/custom.css" rel="stylesheet">
	<link href="${cdn}/static/jsplatform/portal/layout/task/v0/wrapper.css" rel="stylesheet">

	<link href="${cdn}/static/skins/lightblue/assets/jquery-ui/jquery-ui.css" rel="stylesheet" type="text/css">
	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/plugins/jstree/themes/default/style.min.css" rel="stylesheet" type="text/css">

	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-timepicker/bootstrap-timepicker.min.css" rel="stylesheet" type="text/css">
	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css">

	<link href="${cdn}/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" type="text/css">

	<% } else { %>
	<link href="${cdn}/static/skins/lightblue/assetsmin/platform/task/task.all.css?${productionVersion}" rel="stylesheet" type="text/css">
	<% }%>

</head>

<body>

	<!--Script should before formfile-->
	<%
	if (profile=="dev") {
	%>
	<script src="${cdn}/static/jslib/3rdpartyother/json2.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/3rdpartyother/lodash.core.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/bootstrap/global/plugins/jquery.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/jquery/jquery.form.min.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/3rdpartyother/angular-all.min.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/jquery/jquery.tipsy.js" type="text/javascript"></script>

	<script src="${cdn}/static/jslib/bootstrap/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>

	<script src="${cdn}/static/jslib/dhtmlx4/alone/dhxgrid.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/dhtmlx4/ext/dhxgrid.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/dhtmlx4/ext/excell_types.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/dhtmlx4/alone/dhxtoolbar.js" type="text/javascript"></script>

	<script src="${cdn}/static/jslib/bootstrap/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

	<script src="${cdn}/static/jslib/bootstrap/global/plugins/bootstrap-timepicker/bootstrap-timepicker.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/bootstrap/global/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/bootstrap/global/plugins/bootstrap-table/bootstrap-table.js" type="text/javascript"></script>

	<script src="${cdn}/static/jslib/bootstrap/global/plugins/bootstrap-sweetalert/sweetalert.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/bootstrap/global/plugins/bootstrap-toastr/toastr.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/bootstrap/global/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/bootstrap/global/plugins/jstree/jstree.min.js"></script>

	<script src="${cdn}/static/jsplatform/portal/layout/task/v0/bootstrap-modal-ext.js" type="text/javascript"></script>
	<script src="${cdn}/static/jsplatform/portal/layout/task/v0/common.js" type="text/javascript"></script>

	<script src="${cdn}/static/jslib/bootstrap/global/plugins/bootstrap-datetimepicker/locales/bootstrap-datetimepicker.${lang}.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/bootstrap/global/plugins/bootstrap-table/locale/bootstrap-table-${lang}.js" type="text/javascript"></script>

	<script src="${cdn}/static/jslib/3rdpartyother/svg/snap.svg-min.js" type="text/javascript"></script>
	<script src="${cdn}/static/jslib/3rdpartyother/svg/vivus.js" type="text/javascript"></script>

	<script src="${cdn}/static/jsplatform/admin/designer/flow_style.js" type="text/javascript"></script>
	<% } else { %>
	<script src="${cdn}/static/jsmin/platform/task/task.all.js?${productionVersion}" type="text/javascript"></script>
	<% }%>

	<script src="${cdn}/static/jslib/dhtmlx4/ext/dhx_i18n_${lang}.js?${productionVersion}"></script>
	<script src="${cdn}/static/jsplatform/portal/layout/bizdata/edit_v0_i18n_${lang}.js?${productionVersion}"></script>
	<script src="${cdn}/static/jsplatform/portal/layout/bizdata/edit_v0.js?${productionVersion}"></script>


	<!--<div class="tableTabDiv">
		<ul id="navTab" class="nav nav-tabs navClear">
			<li class="active"><a href="#tabbody_1" data-toggle="tab">主表单</a></li>
			<li><a href="#tabbody_2" data-toggle="tab" id="tabnav_attach" style="display:none">附件&nbsp;<span class="badge badge-success"></span></a></li>
			<li id="tabnav_history"><a href="#tabbody_3" data-toggle="tab">历史</a></li>
			<li><a href="#tabbody_4" data-toggle="tab">流程图</a></li>
		</ul>
	</div>-->

	<div id="main1" ng-controller="datactx">
		<div id="navTabContent" class="tab-content">
			<div class="tab-pane fade in active" id="tabbody_1">
				<!--FORM_FILE-->
				<div id="biz_form_content">
				</div>
			</div>
		</div>
	</div>


<script type="text/javascript">

    var loginName = "${loginName}";
    var displayName = "${displayName}";
    var lang = '${lang}';
    var lang_dp = "zh-CN";

    var resloc = '${cdn}';
    var engloc = "/bpmp-engine";
    var apiloc = '/bpmp-engine/api';
    var ctxpath = '/bpmp-engine';
    var fmdCtx = '${fmdCtx}';

    var newTsId = '${newTsId}';

    var imgpath = resloc+'/static/skins/lightblue/images';
    dhtmlx.image_path = resloc+'/static/skins/lightblue/assets/dhtmlx4/imgs/';	//used in grid component
    var imagepath = dhtmlx.image_path;	//used in grid component
    var dhx_skin = 'dhx_skyblue';

    var biz_form_content = $("#biz_form_content");
    biz_form_content.load("${formCdnPath}${formfileName}.html", null, function(cotent, result, response){
//        var $cotent = $(cotent);
//        for (var i=0; i<$cotent.length; i++) {
//            if ($cotent[i].nodeName=='SCRIPT') {
//                biz_form_content[0].appendChild($cotent[i]);
//            }
//        }
        //init page
		if ('success'==result) {
            $(document).ready(function(){
                var editor = new EditViewer();
                editor.init();
            });
		} else {
		    if (response.status==404) {
		        location.href = ctxpath + '/error?msg=FORMFILE_NOTFOUND';
            } else {
                location.href = ctxpath + '/error.jsp';
			}
		}
    });

</script>

</body>
</html>